home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Herra / TIMWIN.ZIP / WINDISPL.CMD < prev    next >
OS/2 REXX Batch file  |  1993-09-22  |  1KB  |  49 lines

  1. ;windispl  --  copies the active image to the specified windows image
  2. ;
  3. ;syntax: windispl h #
  4. ;        h - windows image 
  5. ;        # = display modifier:
  6. ;             1: load grey value LUT
  7. ;             2: load pseudo colour LUT
  8. ;             3: load bitplane LUT: bitpl. 1 = red
  9. ;             4: load bitplane LUT: bitpl. 1 = red, 2 = green, 3 = blue
  10. ;        # = 16:   16 col. windows display - use dithering
  11. ;        # = 16+8: 16 col. windows display - no dithering
  12. ;        # = 256: 256 col. windows display
  13. ;
  14.  
  15. #include timdefs.h
  16. ;#define LUTMASK         7
  17. ;#define DISPL_MASK 0xfff8
  18.  
  19. parms
  20.   file imag            ;Win-image to fill
  21.   int imode   
  22. endparms
  23.  
  24. if (((improp imag) & WIN_BIT) !=  WIN_BIT) stop
  25.  
  26. switch (imode & LUTMASK)    ;isolate LUT info
  27.   case WINLUT1            ;load greyvalue LUT
  28.     /winlut 1
  29. ;  case WINLUT2            ;load pseudocolour LUT
  30. ;    lut 3 2
  31.   case WINLUT3
  32.     /winlut 3            ;load bitplane LUT: bitpl. 1 = red
  33.   case WINLUT4            ;load bitplane LUT: bitpl. 1 = red, 2 = green, 3 = blue
  34.     /winlut 4
  35. endsw
  36.  
  37. switch (imode & DISPL_MASK)  ;remove LUT info
  38.   case 0
  39.     stop
  40.   case NO_DITHER
  41.     stop             ;for NO_DITHER attr. with no image copy (0)
  42.   case COL16
  43.     sdot imag  (imode & BITMASK)      ;copy image using dithering
  44.   default
  45.     save imag        ;copy image as is (also for COL16+NO_DITHER)
  46. endsw
  47.  
  48. stop
  49.